Delete a Knowledge Base
Used to delete a specific knowledge base entry by its ID. This operation is irreversible and will remove all associated data including embeddings and indexed content.
API Endpoint
| Property | Value |
|---|---|
| Request Method | DELETE |
| Request URL | https://api.seliseblocks.com/kb/delete/{kb_id} |
Request
Request Example
curl -X DELETE 'https://api.seliseblocks.com/kb/delete/kb_12345?agent_id=a1b2c3d4-e5f6-7890-abcd-ef1234567890&project_key=YOUR_PROJECT_KEY' \
-H 'accept: application/json'
Request Headers
| Field | Type | Required | Description |
|---|---|---|---|
| accept | string | Yes | Accepted response format. Use application/json |
Path Parameters
| Field | Type | Required | Description |
|---|---|---|---|
| kb_id | string | Yes | Unique identifier of the knowledge base entry to delete. |
Query Parameters
| Field | Type | Required | Description |
|---|---|---|---|
| agent_id | string | Yes | UUID of the AI agent associated with the knowledge entry. |
| project_key | string | No | Project key used to change context. |
warning
This action is irreversible. Once a knowledge base entry is deleted:
- All content and metadata will be permanently removed
- Associated embeddings will be deleted from the vector index
- The AI agent will no longer have access to this information
- The entry cannot be recovered
Consider archiving entries instead of deleting them if you may need the information in the future.
Response
Success Response (200 OK)
Returns an object containing the deletion status.
{
"is_success": true,
"detail": "Knowledge base entry deleted successfully",
"error": {}
}
Response Fields
| Field | Type | Description |
|---|---|---|
| is_success | boolean | Indicates whether the deletion was successful. |
| detail | string | Success or failure message with additional context. |
| error | object | Error details if the operation failed (empty if successful). |
Error Response (422 Unprocessable Entity)
Returns validation error details when the request parameters are invalid.
{
"detail": [
{
"loc": [
"query",
"agent_id"
],
"msg": "field required",
"type": "value_error.missing"
}
]
}
Error Response Fields
| Field | Type | Description |
|---|---|---|
| detail | array | Array of validation error objects. |
| loc | array | Location of the error in the request (e.g., path, query). |
| msg | string | Human-readable error message. |
| type | string | Error type identifier. |
Error Codes
| Status Code | Description | Response Type |
|---|---|---|
| 200 | Successful Response | Success |
| 404 | Not Found - Knowledge entry does not exist | Not Found |
| 422 | Validation Error - Invalid request parameters | Unprocessable Entity |